/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DataConverters.DataReaders;

import DataConverters.interfaces.IConvertable;
import common.gui.progress.IProgressItem;
import DataConverters.interfaces.dataformulaobject.intefaces.Cell;
import DataConverters.utils.WarningMessagesContainer;
import java.util.SortedSet;
import java.util.TreeSet;

/**
 *
 * @author Nobody
 */
public abstract class AbstractDataReader  implements IDataReader {

    protected SortedSet<Cell> formulasList = new TreeSet<Cell>();
    protected IProgressItem progressItem;
    protected IConvertable source;
    protected WarningMessagesContainer warningMessages = new WarningMessagesContainer();

    @Override
    public String getWarningMessages() {
        return warningMessages.getWarningMessages();
    }

    @Override
    public WarningMessagesContainer getWarningMessagesContainer() {
        return warningMessages;
    }

    @Override
    public boolean hasWarningMessages() {
        return warningMessages.hasWarningMessages();
    }
    @Override
    public SortedSet<Cell> getReadedData() {
        return formulasList;
    }

    public AbstractDataReader(IProgressItem progressLabel, IConvertable source) {
        this.progressItem = progressLabel;
        this.source = source;
    }
}
